import cn.wang.ShangJi1;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Shangji {
    public void shangji(){
        ApplicationContext context = new ClassPathXmlApplicationContext("shizhang.xml");
        ShangJi1 shangji1 = (ShangJi1) context.getBean("shangji1");
        shangji1.print();
    }
}
